Person

open class Person(source)

Provides an immutable reference to an entity that appears repeatedly on different surfaces of the platform. For example, this could represent the sender of a message.

Types

Link copied to clipboard
open class Builder
Builder for the immutable Person class.

Functions

Link copied to clipboard
open fun equals(@Nullable otherObject: @Nullable Any): Boolean
Link copied to clipboard
@RequiresApi(value = 28)
@NonNull
open fun fromAndroidPerson(person: @NonNull Person): @NonNull Person
Converts an Android framework android.app.Person to a compat Person.
Link copied to clipboard
@NonNull
open fun fromBundle(@NonNull bundle: @NonNull Bundle): @NonNull Person
Extracts and returns the Person written to the bundle.
Link copied to clipboard
@RequiresApi(value = 22)
@NonNull
open fun fromPersistableBundle(@NonNull bundle: @NonNull PersistableBundle): @NonNull Person
Extracts and returns the Person written to the bundle.
Link copied to clipboard
@Nullable
open fun getIcon(): @Nullable IconCompat
Returns the icon for this Person or null if no icon was provided.
Link copied to clipboard
@Nullable
open fun getKey(): @Nullable String
Returns the key for this Person or null if no key was provided.
Link copied to clipboard
@Nullable
open fun getName(): @Nullable CharSequence
Returns the name for this Person or null if no name was provided.
Link copied to clipboard
@Nullable
open fun getUri(): @Nullable String
Returns the raw URI for this Person or null if no URI was provided.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun isBot(): Boolean
Returns whether or not this Person is a machine rather than a human.
Link copied to clipboard
open fun isImportant(): Boolean
Returns whether or not this Person is important to the user of this device with regards to how frequently they interact.
Link copied to clipboard
open fun resolveToLegacyUri(): @NonNull String
Link copied to clipboard
open fun toAndroidPerson(): @NonNull Person
Converts this compat Person to the base Android framework android.app.Person.
Link copied to clipboard
@NonNull
open fun toBuilder(): @NonNull Person.Builder
Creates and returns a new Builder initialized with this Person's data.
Link copied to clipboard
@NonNull
open fun toBundle(): @NonNull Bundle
Writes and returns a new Bundle that represents this Person.
Link copied to clipboard
@RequiresApi(value = 22)
@NonNull
open fun toPersistableBundle(): @NonNull PersistableBundle
Writes and returns a new PersistableBundle that represents this Person.